package com.login.controller;

import api.login.LoginApi;
import com.login.service.LoginService;
import dto.Dto;
import dto.GetAdmin;
import org.springframework.web.bind.annotation.RestController;
import pojo.Admin;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@RestController
public class LoginController implements LoginApi {

    @Resource
    private LoginService loginService;

    @Override
    public Dto<Admin> selectadmin(String username) {
        return loginService.selectadmin(username);
    }

    @Override
    public List selectAdminPer(String  adminId) {
        return loginService.selectAdminPer(adminId);
    }

    @Override
    public List getAdmin1(Map<String,Object> map) {
        return loginService.getAdmin1(map);
    }

    @Override
    public int updateAdmin(List<GetAdmin> list) {
        return loginService.updateAdmin(list);
    }
}
